package com.wsd.service;/*
 *
 *  *  Copyright © 2020 CIB Co.Ltd
 *  *  * All right reserved
 *  *  * Auther:7ason
 *  *
 *
 */

import com.wsd.common.Result;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public interface WechatService {

    /**
     * jscode换取openid
     * @param jscode
     */
    public Result jscodeToWeixinSession(String jscode);

    /**
     * 下发授信额度的消息
     * @param openid 用户openid
     * @param result  额度值
     * @param info  附加内容
     */
    public Result sendWechatMessageByQuota(String openid,String result,String info);


    /**
     * 下发放款的消息
     * @param openid 用户openid
     * @param amount  额度值
     * @param loanTime  提现时间
     */
    public Result sendWechatMessageByLoan(String openid, int amount, LocalDateTime loanTime);

    /**
     * 下发逾期的消息
     * @param openid 用户openid
     * @param overdueTime  应还款时间
     */
    public Result sendWechatMessageByOverdue(String openid,LocalDateTime overdueTime);

    /**
     * 根据userId查询WxOpenId
     * @param userIdList
     * @return
     */
    public List<String> queryOpenIds(List<String> userIdList);
}